package cc.lj1.test.authtest.model;

import cc.lj1.auth.AuthenticatableRole;
import cc.lj1.auth.AuthenticatableUser;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class AnotherUser  implements AuthenticatableUser {
    private String id;
    private String name;

    @Override
    public List<? extends AuthenticatableRole> getRoles() {
        List<AuthenticatableRole> roles = new ArrayList<>();
        roles.add(new AuthenticatableRole() {
            @Override
            public List<String> getPermissions() {
                List<String> list = new ArrayList<>();
                list.add("acl2");
                return list;
            }
        });
        return roles;
    }
}
